package com.ktjy.ktmall.domain;

import lombok.Data;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ktjy.common.annotation.Excel;
import com.ktjy.common.core.domain.TreeEntity;

/**
 * 商品分类管理对象 t_goods_category
 *
 * @author ktjy
 * @date 2025-03-17
 */
@Data
@TableName("t_goods_category")
public class GoodsCategory extends TreeEntity {
private static final long serialVersionUID=1L;

        /** 分类id */
            @TableId(value = "id" , type = IdType.AUTO)
        private Long id;

        /** 分类级别 */
            @TableField(value = "category_level")
        private Long categoryLevel;

        /** 分类名称 */
                @Excel(name = "分类名称")
            @TableField(value = "name")
        private String name;

        /** 排序值 */
                @Excel(name = "排序值")
            @TableField(value = "category_rank")
        private Long categoryRank;

        /** 图标 */
                @Excel(name = "图标")
            @TableField(value = "icon")
        private String icon;

        /** 是否启用 */
                @Excel(name = "是否启用")
            @TableField(value = "enabled")
        private Long enabled;


@Override
public String toString(){
    return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
        .append("id" ,getId())
        .append("categoryLevel" ,getCategoryLevel())
        .append("parentId" ,getParentId())
        .append("name" ,getName())
        .append("categoryRank" ,getCategoryRank())
        .append("icon" ,getIcon())
        .append("enabled" ,getEnabled())
        .append("createTime" ,getCreateTime())
        .append("updateTime" ,getUpdateTime())
        .append("createBy" ,getCreateBy())
        .append("updateBy" ,getUpdateBy())
        .append("remark" ,getRemark())
            .toString();
}
        }